<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: a'su's
  Date: 2021/9/12
  Time: 11:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>index</title>
    <script src="js/jquery-1.11.1.js"></script>
    <script>
        $(function () {
            $("#btn").click(
               function () {
                    $.ajax({
                        type:"POST",
                        url:"/str1",
                        data:{username:"张三",password:"123"},
                        success:function (msg) {
                            alert(msg.teamName);
                        }
                    });
               }
            );
        });
    </script>
</head>
<body>

    <form method="post">
        <button type="button" id="btn" value="提交ajax请求"></button>
    <form/>

    <hr>
    <h1> index---------${teamName}----------- </h1>

</body>
</html>
